import request from '@/utils/request'

// 设备列表
export async function deviceList(params) {
    try {
        const res = await request({
            url: '/Device/deviceList',
            method: 'post',
            params
        })
        return res
    } catch (error) {
        return null
    }
}

// 设备详情/状态
export async function deviceInfo(params) {
    try {
        const res = await request({
            url: '/Device/deviceInfo',
            method: 'post',
            params
        })
        return res
    } catch (error) {
        return null
    }
}

// 删除设备
export async function deviceDel(params) {
    try {
        const res = await request({
            url: '/Device/deviceDel',
            method: 'post',
            params
        })
        return res
    } catch (error) {
        return null
    }
}

// 停止设备
export async function devEnd(params) {
    try {
        const res = await request({
            url: '/Device/devEnd',
            method: 'post',
            params
        })
        return res
    } catch (error) {
        return null
    }
}

// 设备订单
export async function deviceOrderPage(params) {
    try {
        const res = await request({
            url: '/Device/deviceOrderPage',
            method: 'post',
            params
        })
        return res
    } catch (error) {
        return null
    }
}


// 经营者管理列表
export async function deviceAppUser(params) {
    try {
        const res = await request({
            url: '/Device/deviceAppUser',
            method: 'post',
            params
        })
        return res
    } catch (error) {
        return null
    }
}

// 经营者管理 信息审核
export async function deviceAppUserState(params) {
    try {
        const res = await request({
            url: '/Device/deviceAppUserState',
            method: 'post',
            params
        })
        return res
    } catch (error) {
        return null
    }
}

// 设备分布
export async function deviceMap(params) {
    try {
        const res = await request({
            url: '/Device/deviceMap',
            method: 'post',
            params
        })
        return res
    } catch (error) {
        return null
    }
}